<div id="Assigning-revisions"></div>
<div class="header">
<p>
Next: [[cvs: Tags-Symbolic revisions#Tags&ndash;Symbolic revisions|Tags]], Previous: [[cvs: Versions, revisions and releases#Versions, revisions and releases|Versions revisions releases]], Up: [[cvs: Revisions#Revisions|Revisions]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Assigning-revisions-1"></div>
=== Assigning revisions ===

By default, <small>CVS</small> will assign numeric revisions by
leaving the first number the same and incrementing the
second number.  For example, <code>1.1</code>, <code>1.2</code>,
<code>1.3</code>, etc.

When adding a new file, the second number will always
be one and the first number will equal the highest
first number of any file in that directory.  For
example, the current directory contains files whose
highest numbered revisions are <code>1.7</code>, <code>3.1</code>,
and <code>4.12</code>, then an added file will be given the
numeric revision <code>4.1</code>.

Normally there is no reason to care
about the revision numbers&mdash;it is easier to treat them
as internal numbers that <small>CVS</small> maintains, and tags
provide a better way to distinguish between things like
release 1 versus release 2 of your product
(see [[cvs: Tags-Symbolic revisions#Tags&ndash;Symbolic revisions|Tags]]).  However, if you want to set the
numeric revisions, the &lsquo;<code>-r</code>&rsquo; option to <code>cvs
commit</code> can do that.  The &lsquo;<code>-r</code>&rsquo; option implies the
&lsquo;<code>-f</code>&rsquo; option, in the sense that it causes the
files to be committed even if they are not modified.

For example, to bring all your files up to
revision 3.0 (including those that haven&rsquo;t changed),
you might invoke:

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -r 3.0
</div>

Note that the number you specify with &lsquo;<code>-r</code>&rsquo; must be
larger than any existing revision number.  That is, if
revision 3.0 exists, you cannot &lsquo;<code>cvs commit
-r 1.3</code>&rsquo;.  If you want to maintain several releases in
parallel, you need to use a branch (see [[cvs: Branching and merging#Branching and merging|Branching and merging]]).

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
